
#ifndef  BASE_H
#define  BASE_H

typedef struct base_s base_t;

//---------- member method declare---------------
typedef void (*cb_free_t)(base_t * ptr);
typedef int (*cb_encrypted_t)(base_t * ptr, char * src, char * dest);
typedef int (*cb_get_value_t)(base_t *ptr);
typedef void (*cb_set_value_t)(base_t *ptr, int value);


struct base_s {
    cb_free_t cb_free_;
    cb_encrypted_t cb_encrypted_;
    cb_get_value_t  cb_get_value_;
    cb_set_value_t  cb_set_value_;
    int value_;
};


//----------constructor ------------------
base_t * base_create(int value);
void base_interface_init(base_t * ptr, cb_free_t free, cb_encrypted_t encrypted, cb_get_value_t get_value, cb_set_value_t set_value, int value);

#endif   /* BASE_H */
